﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<NDepot.Models.UI.ProductInput>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Index
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2><%: NDepot.Resources.Index %></h2>

    <table>
        <tr>
            <th></th>
            <th>
                <%: NDepot.Resources.Title %>
            </th>
            <th>
                <%: NDepot.Resources.Description %>
            </th>
            <th>
                <%: NDepot.Resources.ImageUrl %>
            </th>
            <th>
                <%: NDepot.Resources.Price %>
            </th>
        </tr>

    <% foreach (var item in Model) { %>
    
        <tr>
            <td>
                <%: Html.ActionLink(NDepot.Resources.Edit, "Edit", new { id=item.Id }) %> |
                <%: Html.ActionLink(NDepot.Resources.Details, "Details", new { id = item.Id })%> |
                <%: Html.ActionLink(NDepot.Resources.Delete, "Delete", new { id = item.Id })%> |
                <%= Html.ActionLink(NDepot.Resources.WhoBought, "WhoBought", "Info", new { id = item.Id }, null)%>
            </td>
            <td>
                <%: item.Title %>
            </td>
            <td>
                <%: item.Description %>
            </td>
            <td>
                <%: item.ImageUrl %>
            </td>
            <td>
                <%: item.Price %>
            </td>
        </tr>
    
    <% } %>

    </table>

    <p>
        <%: Html.ActionLink(NDepot.Resources.CreateNew, "Create") %>
    </p>

</asp:Content>

